package com.lechuang.user.manager.Impl;

import com.lechuang.user.entity.BankInfo;
import com.lechuang.user.manager.BankManager;
import com.lechuang.user.service.BankInfoService;
import com.lechuang.user.vo.BankVo;
import jakarta.annotation.Resource;
import jodd.util.CollectionUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author apple
 * @version 1.0
 * @date 2024/6/21
 */
@Service
@Log4j2
public class BankManagerImpl implements BankManager {

    @Resource
    private BankInfoService bankInfoService;
    @Override
    public List<BankVo> queryList() {
        List<BankVo> bankVoList = new ArrayList<>();
        List<BankInfo> bankInfoList = bankInfoService.queryBankList();
        bankInfoList.forEach(bean ->{
            BankVo bankVo =new BankVo();
            bankVo.setId(bean.getId());
            bankVo.setBankName(bean.getBankName());
            bankVoList.add(bankVo);
            });
        return bankVoList;
    }
}
